package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HomestayInfoMapper;
import com.ruoyi.system.domain.HomestayInfo;
import com.ruoyi.system.service.IHomestayInfoService;

/**
 * 民宿管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-24
 */
@Service
public class HomestayInfoServiceImpl implements IHomestayInfoService 
{
    @Autowired
    private HomestayInfoMapper homestayInfoMapper;

    /**
     * 查询民宿管理
     * 
     * @param homestayId 民宿管理主键
     * @return 民宿管理
     */
    @Override
    public HomestayInfo selectHomestayInfoByHomestayId(Long homestayId)
    {
        return homestayInfoMapper.selectHomestayInfoByHomestayId(homestayId);
    }

    /**
     * 查询民宿管理列表
     * 
     * @param homestayInfo 民宿管理
     * @return 民宿管理
     */
    @Override
    public List<HomestayInfo> selectHomestayInfoList(HomestayInfo homestayInfo)
    {
        return homestayInfoMapper.selectHomestayInfoList(homestayInfo);
    }

    /**
     * 新增民宿管理
     * 
     * @param homestayInfo 民宿管理
     * @return 结果
     */
    @Override
    public int insertHomestayInfo(HomestayInfo homestayInfo)
    {
        return homestayInfoMapper.insertHomestayInfo(homestayInfo);
    }

    /**
     * 修改民宿管理
     * 
     * @param homestayInfo 民宿管理
     * @return 结果
     */
    @Override
    public int updateHomestayInfo(HomestayInfo homestayInfo)
    {
        return homestayInfoMapper.updateHomestayInfo(homestayInfo);
    }

    /**
     * 批量删除民宿管理
     * 
     * @param homestayIds 需要删除的民宿管理主键
     * @return 结果
     */
    @Override
    public int deleteHomestayInfoByHomestayIds(Long[] homestayIds)
    {
        return homestayInfoMapper.deleteHomestayInfoByHomestayIds(homestayIds);
    }

    /**
     * 删除民宿管理信息
     * 
     * @param homestayId 民宿管理主键
     * @return 结果
     */
    @Override
    public int deleteHomestayInfoByHomestayId(Long homestayId)
    {
        return homestayInfoMapper.deleteHomestayInfoByHomestayId(homestayId);
    }
}
